# igvc.inc for Stage 3

define circle model
(
#   block (
#      points 16
#      point[0]  [1.000000 0.000000]
#      point[1]  [0.923880 0.382683]
#      point[2]  [0.707107 0.707107]
#      point[3]  [0.382683 0.923880]
#      point[4]  [-0.000000 1.000000]
#      point[5]  [-0.382683 0.923880]
#      point[6]  [-0.707107 0.707107]
#      point[7]  [-0.923880 0.382683]
#      point[8]  [-1.000000 -0.000000]
#      point[9]  [-0.923880 -0.382683]
#      point[10] [-0.707107 -0.707107]
#      point[11] [-0.382683 -0.923880]
#      point[12] [0.000000 -1.000000]
#      point[13] [0.382683 -0.923880]
#      point[14] [0.707107 -0.707107]
#      point[15] [0.923880 -0.382683]
#   )
   block (
	points 8

	point[0]	[0.500000 0.000000]
	point[1]	[0.353553 0.353553]
	point[2]	[-0.000000 0.500000]
	point[3]	[-0.353553 0.353553]
	point[4]	[-0.500000 -0.000000]
	point[5]	[-0.353553 -0.353553]
	point[6]	[0.000000 -0.500000]
	point[7]	[0.353553 -0.353553]
	z [0 1]
   )

   obstacle_return 1 # Can hit things.
   laser_return 1    # reflects laser beams
   ranger_return 1   # reflects sonar beams
#   blobfinder_return 1 # Seen by blobfinders  
   fiducial_return 1   # Seen as "1" fiducial finders


   
# Matlab code to generate circle polygon
#     numpoints = 16;
#    angle = double([0:360/numpoints:360]);
#    X = cosd(angle)/2;
#    Y = sind(angle)/2;
#    fprintf('\n\n\tpolygon[0].points %d\n', numpoints);
#    for i = 0:numpoints-1
#         fprintf('\tpolygon[0].point[%d]\t[%f %f]\n', i, X(i+1), Y(i+1))
#    end
#

)
define rectangle model 
(
   block (
	points 4

	point[0]	[0.500000 0.500000]
	point[1]	[-0.500000 0.500000]
	point[2]	[-0.500000 -0.500000]
	point[3]	[0.500000 -0.500000]
	z [0 1]
   )
   obstacle_return 1 # Can hit things.
   laser_return 1    # reflects laser beams
   ranger_return 1   # reflects sonar beams
#   blobfinder_return 1 # Seen by blobfinders  
   fiducial_return 1   # Seen as "1" fiducial finders

)


define barrel model
(
   size [0 0 0]  # 1 meter tall, .61 meter diameter base
   circle ( pose [ 0 0 0 0] size [0.55 0.55 .2] color "orange")
   circle ( pose [ 0 0 .2 0] size [0.51 0.51 .2] color "white")
   circle ( pose [ 0 0 .4 0] size [0.49 0.49 .2] color "orange")
   circle ( pose [ 0 0 .6 0] size [0.47 0.47 .2] color "white")
   circle ( pose [ 0 0 .8 0] size [0.45 0.45 .2] color "orange")

   obstacle_return 1 # Can hit things.
   laser_return 1    # reflects laser beams
   ranger_return 1   # reflects sonar beams
  gripper_return 1
  gui_move 1
  gui_nose 0
  fiducial_return 1

)

define barrelboring circle
(
   size [0.510 0.510 1.000]
   color "orange"
   obstacle_return 1 # Can hit things.
   laser_return 1    # reflects laser beams
   ranger_return 1   # reflects sonar beams
  gripper_return 1
  gui_move 1
  gui_nose 0
  fiducial_return 1
)

define waypoint1m model
(
   size [0 0 0]  # 1 meter tall, .61 meter diameter base
   circle ( pose [ 0 0 0 0] size [0.5 0.5 .01] color "yellow" obstacle_return 0)
   circle ( pose [ 0 0 .01 0] size [0.25 0.25 .01] color "white" obstacle_return 0)
   circle ( pose [ 0 0 .02 0] size [0.05 0.05 .01] color "orange" obstacle_return 0)
   gripper_return 0
   obstacle_return 0 # Can hit things.
   laser_return 0    # reflects laser beams
   ranger_return 0   # reflects sonar beams

  gui_move 1
  gui_nose 0
  fiducial_return 1

)


define waypoint2m model
(
   size [0 0 0]  # 1 meter tall, .61 meter diameter base
   circle ( pose [ 0 0 0 0] size [1.0 1.0 .01] color "yellow" obstacle_return 0 )
   circle ( pose [ 0 0 .01 0] size [0.25 0.25 .01] color "white" obstacle_return 0 )
   circle ( pose [ 0 0 .02 0] size [0.05 0.05 .01] color "orange" obstacle_return 0 )
   gripper_return 0
   obstacle_return 0 # Can hit things.
   laser_return 0    # reflects laser beams
   ranger_return 0   # reflects sonar beams

  gui_move 1
  gui_nose 0
  fiducial_return 1

)
define startpoint1m model
(
   size [0 0 0]  # 1 meter tall, .61 meter diameter base
   rectangle( pose [ 0 0 0 0] size [0.5 0.5 .01] color "red" obstacle_return 0)
#   circle ( pose [ 0 0 0 0] size [0.5 0.5 .01] color "red" obstacle_return 0)
   circle ( pose [ 0 0 .01 0] size [0.25 0.25 .01] color "white" obstacle_return 0)
   circle ( pose [ 0 0 .02 0] size [0.05 0.05 .01] color "orange" obstacle_return 0)
   gripper_return 0
   obstacle_return 0 # Can hit things.
   laser_return 0    # reflects laser beams
   ranger_return 0   # reflects sonar beams

  gui_move 1
  gui_nose 0
  fiducial_return 1

)

# a wall6m for testing
define wall6m model(
  size [ 6 0.1 1.00 ]
  color "black"
  gripper_return 1
  gui_move 1
  gui_nose 0
  fiducial_return 10
)

# a wall8m for testing
define wall8m model(
  size [ 8 0.1 1.00 ]
  color "black"
  gripper_return 1
  gui_move 1
  gui_nose 0
  fiducial_return 10
)

define wall3ft model(
  size [ .9 0.1 1.00 ]
  color "black"
  gripper_return 1
  gui_move 1
  gui_nose 0
  fiducial_return 10
)
define wall4ft model(
  size [ 1.2 0.1 1.00 ]
  color "black"
  gripper_return 1
  gui_move 1
  gui_nose 0
  fiducial_return 10
)
define wall5ft model(
  size [ 1.5 0.1 1.00 ]
  color "black"
  gripper_return 1
  gui_move 1
  gui_nose 0
  fiducial_return 10
)
define wall6ft model(
  size [ 1.8 0.1 1.00 ]
  color "black"
  gripper_return 1
  gui_move 1
  gui_nose 0
  fiducial_return 10
)
define wall7ft model(
  size [ 2.1 0.1 1.00 ]
  color "black"
  gripper_return 1
  gui_move 1
  gui_nose 0
  fiducial_return 10
)
define wall8ft model(
  size [ 2.4 0.1 1.00 ]
  color "black"
  gripper_return 1
  gui_move 1
  gui_nose 0
  fiducial_return 10
)

